LCC (compiler)

LCC ("Local C Compiler" or "Little C Compiler") is a small retargetable compiler program for the ANSI C programming language. It is available at no charge for personal use but is not free software.[1] It was developed by Chris Fraser and David Hanson. id Software's computer game Quake III relies on a modified version of LCC to compile source code for its virtual machine.

Contents

LCC

LCC is simple to understand and well-documented. Its design is described in Fraser and Hanson's book A Retargetable C Compiler: Design and Implementation. The book includes most of the source code for version 3.6 of the compiler, which was written as a literate program using noweb. As of July 2011 the current version of LCC is 4.2, but much of the book still applies to this version. The major change since the book was published is in the code-generator interface, which is described in a separate document.[2]

The source code for LCC is around 20,000 lines, much smaller than many other compilers.[3] The Tiny C Compiler is one of the few compilers smaller than LCC.

LCC is frequently preferred over GCC -- on PC/Windows platforms because LCC-Win32 comes with a nice graphical IDE, and on new platforms LCC is easier to port than GCC.[4]

LCC can generate code for several processor architectures, including Alpha, SPARC, MIPS, and x86 (PCs); there is also an LCC backend that generates Microsoft's Common Intermediate Language.

Lcc-win32

The Lcc-win32 or LccWin32 system is a full featured C Development Environment for the Microsoft Windows operating system, written by Jacob Navia. He continued the work of Hanson and Fraser, who wrote the original LCC compiler.

It features:

Lcc-win64

Under development - can currently successfully compile itself, the IDE (wedit64) and around 550 test files. lcc-win64 will also feature more advanced code optimizations.

License

LCC is free for personal use and may be redistributed with attribution. LCC may not be sold for profit, but it may be included with other software that is sold for profit.[1]

References

  1. ^ a b "LCC License". https://github.com/drh/lcc/blob/master/CPYRIGHT. Retrieved 5 July 2011. 
  2. ^ Fraser, Christopher W.; Hanson, David R. (July 2001). "The lcc 4.x Code-Generation Interface". Microsoft Research. Technical Report MSR-TR-2001-64. http://storage.webhop.net/documents/interface4.pdf. Retrieved 5 July 2011. 
  3. ^ Sao-Jie Chen, Guang-Huei Lin, Pao-Ann Hsiung, Yu-Hen Hu. "Hardware software co-design of a multimedia SOC platform". Section 5.6.1: LCC Compiler Infrastructure. [1]
  4. ^ Rainer Leupers, Peter Marwedel. "Retargetable compiler technology for embedded systems: tools and applications". 2001. p. 72, p. 74. ISBN 0792375785, ISBN 9780792375784 [2]

Bibliography

External links